const wxml = (detail_) => `
<view class="container">
    <view  >
      <text class="head_title">维修服务报告</text>
	</view>
	<view class="item">
	  <text class="left">工单号：${detail_.workID}</text>
	  <text class="right">日期：${detail_.time}</text>
	</view>
	<view class="border_">
	</view>
	<view class="item">
	  <text class="left3">客户名称：${detail_.name}</text>
	</view>
	<view class="item">
	  <text class="left">设备名称：${detail_.equipment_name}</text>
	</view>
	<view class="item">
	  <text class="left">型号：${detail_.equipment_marking}</text>
	  <text class="right">软件版本：${detail_.software_version}</text>
	</view>
	<view class="item">
	  <text class="left">序列号：${detail_.serial}</text>
	  <text class="right"></text>
	</view>
	<view class="border_">
	</view>
	<view  >
	  <text class="left_title">服务信息</text>
	</view>
	<view class="item">
	  <text class="left1">客户报修时间：</text>
	  <text class="right1">${detail_.createtime}</text>
	</view>
	<view class="item">
	  <text class="left1">工程师到达时间：</text>
	  <text class="right1">${detail_.present_time}</text>
	</view>
	<view class="item">
	  <text class="left1">设备合同状态：</text>
	  <text class="right1">${detail_.contract_status}</text>
	</view>
	<view class="item">
	  <text class="left1">服务类型：</text>
	  <text class="right1">${detail_.service_type}</text>
	</view>
	<view class="border_">
	</view>
	<view class="item">
	  <text class="left1">客户报修内容：</text>
	  <text class="right1"></text>
	</view>
	<view>
	  <text class="content">${detail_.content}</text>
	</view>
	<view class="border_">
	</view>
	<view class="item">
	  <text class="left1">维修记录：</text>
	  <text class="right1"></text>
	</view>
	<view>
	  <text class="content">${detail_.repair}</text>
	</view>
	<view class="border_">
	</view>
	<view class="item">
	  <text class="left1">维修结果及建议：</text>
	  <text class="right1"></text>
	</view>
	<view>
	  <text class="content">${detail_.ending}</text>
	</view>
	<view class="border_">
	</view>
	<view class="item">
	  <text class="left2">客户签字(点击代签字)</text>
	  <text class="right2">工程师签字</text>
	</view>
	<view class="item1">
	  <image src="` + detail_.image + `"  class="pic"/>
	  <text class="right2">${detail_.nickname}</text>
	</view>
	<view class="border_">
	</view>
	<view>
	  <text class="content1">备注：本函仅针对该工单所反馈问题做确认操作，签字后该工单即变更为完结状态，如有其他问题请重新发起报修，谢谢</text>
	</view>
</view>
`

/**
 * @param {*} screenWidth 屏幕宽度
 * @param {*} canvasWidth  画布宽度
 * @param {*} canvasHeight  画布高度
 * @param {*} numberWidth  数字宽度，动态设置
 * @return {*} 
 */
const style = (screenWidth, canvasWidth, canvasHeight) => {
	return {
		"container": {
			width: canvasWidth,
			height: canvasHeight*1.6,
			position: 'relative',
			backgroundColor: '#ffffff',
			flexDirection: "column"
		},
		"border_": {
			height: '1',
			width:  canvasWidth * 0.89,
			marginLeft: canvasWidth * 0.05,
			backgroundColor: "#EBEEF1"
		},
		"item":{
			display:'flex',
			flexDirection: "row",
			alignItems: 'center',
			paddingTop:'5',
			paddingLeft:'22'
		},
		"item1":{
			display:'flex',
			flexDirection: "row",
			alignItems: 'center',
			paddingTop:'5',
			paddingLeft:'22',
			backgroundColor: "#F5F6F8",
			marginBottom:5,
		},
		"left2": {
			fontSize: 16,
			color: "#000",
			fontWight:'600',
			width: canvasWidth * 0.5,
			height: screenWidth * 0.06,
			textAlign: 'center',
			display:'flex',
		},
		"left3":{
			fontSize: 14,
			color: "#333",
			width: canvasWidth ,
			height: screenWidth * 0.06,
			textAlign: 'left',
			display:'flex',
		},
		"right2": {
			fontSize: 14,
			color: "#000",
			fontWight:'600',
			width: canvasWidth * 0.5,
			height: screenWidth * 0.06,
			textAlign: 'center',
			display:'flex',
		},
		"left1": {
			fontSize: 14,
			color: '#333',
			width: canvasWidth * 0.4,
			height: screenWidth * 0.06,
			textAlign: 'left',
			fontSize: 14,
			display:'flex',
			
		},
		"right1": {
			color: '#333',
			width: canvasWidth * 0.6,
			height: screenWidth * 0.06,
			textAlign: 'left',
			fontSize: 14,
			alignItems: 'left',
			display:'flex',
		},
		"left": {
			color: '#333',
			width: canvasWidth * 0.5,
			height: screenWidth * 0.06,
			textAlign: 'left',
			fontSize: 14,
			display:'flex',
		},
		"right": {
			color: '#333',
			width: canvasWidth * 0.5,
			height: screenWidth * 0.06,
			textAlign: 'left',
			fontSize: 14,
			alignItems: 'left',
			display:'flex',
		},
		"head_title": {
			fontSize: 14,
			color: "#969699",
			width: canvasWidth * 0.84,
			height: screenWidth * 0.1,
			marginLeft: canvasWidth * 0.08,
			textAlign: "center",
			marginTop: canvasWidth * 0.05,
			// backgroundColor: "#EBEEF1",
		},
		"left_title": {
			fontSize: 16,
			color: "#000",
			fontWight:'600',
			width: canvasWidth * 0.84,
			height: screenWidth * 0.07,
			marginLeft: canvasWidth * 0.06,
			textAlign: "left",
			marginTop: canvasWidth * 0.05,
			// backgroundColor: "#EBEEF1",
		},
		"content": {
			fontSize: 12,
			color: '#333',
			width: canvasWidth * 0.84,
			minHeight: screenWidth * 0.3,
			marginLeft: canvasWidth * 0.06,
			textAlign: "left",
		},
		"content1":{
			fontSize: 12,
			color: '#ccc',
			width: canvasWidth * 0.84,
			minHeight: screenWidth * 0.3,
			marginLeft: canvasWidth * 0.06,
			textAlign: "left",
			marginTop:15
		},
		"pic": {
			width: 135,
			height: 77.2,
			marginTop: canvasWidth * 0.02,
			marginLeft: canvasWidth * 0.1,
			marginBottom: canvasWidth * 0.02,
			backgroundColor: "#F5F6F8",
			
		},
	}
}

module.exports = {
	wxml,
	style
}
